<?php

require 'base.php';

class Bump extends FBController {
	function __construct()
	{
		parent::__construct();
	}

	function index($id_evento = null)
	{
		$s = 'UPDATE '.$this->db->dbprefix('eventi').' SET start_time=ADDDATE(start_time,1), end_time=ADDDATE(end_time,1)';
		if ($id_evento)
			$s .= ' WHERE id_evento = ' . $this->db->escape($id_evento);
		if ($this->db->query($s))
			$this->output->set_output('OK, affected rows: ' . $this->db->affected_rows());
		else show_error('Errore query');
	}
}
